import { newRequest } from '@/utils/newRequest'
import request from '@/utils/request'

/*
* 返工大类查询
* */
export function GetQcReasons(params) {
  return request({
    url: '/api/QcReason/GetQcReasons',
    method: 'get',
    params
  })
}
/*
* 查询返工原因下的所有子项
* */
export function GetQcReasonDetail(params) {
  return request({
    url: '/api/QcReason/GetQcReasonDetail',
    method: 'get',
    params
  })
}
/*
* 新增返工类型
* */
export function AddQcReason(data) {
  return request({
    url:'/api/QcReason/AddQcReason',
    method:'post',
    data
    })
}
/*
* 新增返工类型下的返工明细
* */
export function AddQcReasonDetail({data,params}={}) {
  return request({
    url:'/api/QcReason/AddQcReasonDetail',
    method:'post',
    data,params
  })
}
/*
* 更新返工原因
* */
export function UpdateReason(data) {
  return request({
    url:'/api/QcReason/UpdateReason',
    method:'post',
    data
    })
}
/*
* 更新返工原因明细
* */
export function UpdateReasonDetail(data) {
  return request({
    url:'/api/QcReason/UpdateReasonDetail',
    method:'post',
    data
  })
}
/*
* 删除返工原因
* */
export function DeleteReason(data) {
  return request({
    url:'/api/QcReason/DeleteReason',
    method:'post',
    params:data
  })
}
/*
*删除返工原因明细
* */
export function DeleteReasonDteail(data) {
  return request({
    url:'/api/QcReason/DeleteReasonDteail',
    method:'post',
    params:data
  })
}
/*
* 删除解决方案
* */
export function DeleteSolution(data) {
  return request({
    url:'/api/QcReason/DeleteSolution',
    method:'post',
    params:data
  })
}
/*
* 获取全部解决方案
* */
export function GetSolution(params) {
  return request({
    url:'/api/QcReason/GetSolution',
    method:'get',
    params
  })
}
/*
* 更新解决方案
* */
export function UpdateSolution(data) {
  return request({
    url:'/api/QcReason/UpdateSolution',
    method:'post',
    data
  })
}
/*
* 添加返工解决方案
* */
export function AddSolution(data) {
  return request({
    url:'/api/QcReason/AddSolution',
    method:'post',
    data
  })
}
